package ch02.graphics;

import java.awt.Graphics;
import java.awt.Graphics2D;

import javax.swing.JComponent;

@SuppressWarnings("serial")
public class BullsEyeComponent extends JComponent{
	
	BullsEye bullsEye;
	
	public BullsEyeComponent(int x, int y, int size, int rings)
	{
		bullsEye = new BullsEye(x, y, size, rings);
	}
	
	@Override
	public void paintComponent(Graphics g)
	{
		Graphics2D g2 = (Graphics2D) g;
		
		bullsEye.draw(g2);
	}

}
